﻿<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:ser="http://schemas.microsoft.com/2003/10/Serialization/" xmlns:tns="http://schemas.datacontract.org/2004/07/EzDesk.Apps.Model.Attendance" elementFormDefault="qualified" targetNamespace="http://schemas.datacontract.org/2004/07/EzDesk.Apps.Model.Attendance" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:import namespace="http://schemas.microsoft.com/2003/10/Serialization/" />
  <xs:import namespace="http://schemas.datacontract.org/2004/07/EzDesk.Core.Model" />
  <xs:complexType name="LeaveInfo">
    <xs:sequence>
      <xs:element minOccurs="0" name="AuditNote" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="AuditTime" type="xs:dateTime" />
      <xs:element minOccurs="0" name="AuditUserId" type="ser:guid" />
      <xs:element minOccurs="0" name="CreateTime" type="xs:dateTime" />
      <xs:element minOccurs="0" name="Description" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="EndTime" type="xs:dateTime" />
      <xs:element minOccurs="0" name="Id" type="ser:guid" />
      <xs:element minOccurs="0" name="IsAgreed" type="xs:boolean" />
      <xs:element minOccurs="0" name="IsAudited" type="xs:boolean" />
      <xs:element minOccurs="0" name="IsForWork" type="xs:boolean" />
      <xs:element minOccurs="0" name="LeaveTypeId" type="ser:guid" />
      <xs:element minOccurs="0" name="LeaveTypeName" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="StartTime" type="xs:dateTime" />
      <xs:element xmlns:q1="http://schemas.datacontract.org/2004/07/EzDesk.Core.Model" minOccurs="0" name="User" nillable="true" type="q1:SimpleUser" />
      <xs:element minOccurs="0" name="UserId" type="ser:guid" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="LeaveInfo" nillable="true" type="tns:LeaveInfo" />
  <xs:complexType name="AttendanceStatus">
    <xs:sequence>
      <xs:element minOccurs="0" name="AttendanceType" type="tns:AttendanceType" />
      <xs:element minOccurs="0" name="IsAbnormal" type="xs:boolean" />
      <xs:element minOccurs="0" name="IsDuplicated" type="xs:boolean" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="AttendanceStatus" nillable="true" type="tns:AttendanceStatus" />
  <xs:simpleType name="AttendanceType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="onDuty" />
      <xs:enumeration value="offDuty" />
    </xs:restriction>
  </xs:simpleType>
  <xs:element name="AttendanceType" nillable="true" type="tns:AttendanceType" />
  <xs:complexType name="ArrayOfLeaveType">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="LeaveType" nillable="true" type="tns:LeaveType" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="ArrayOfLeaveType" nillable="true" type="tns:ArrayOfLeaveType" />
  <xs:complexType name="LeaveType">
    <xs:sequence>
      <xs:element minOccurs="0" name="Id" type="ser:guid" />
      <xs:element minOccurs="0" name="IsForWork" type="xs:boolean" />
      <xs:element minOccurs="0" name="LeaveTypeName" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="Remark" nillable="true" type="xs:string" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="LeaveType" nillable="true" type="tns:LeaveType" />
  <xs:complexType name="AttendanceConfig">
    <xs:sequence>
      <xs:element minOccurs="0" name="LunchBreakTime" type="ser:duration" />
      <xs:element minOccurs="0" name="OnDutyOffsetAfterward" type="ser:duration" />
      <xs:element minOccurs="0" name="OnDutyOffsetForward" type="ser:duration" />
      <xs:element minOccurs="0" name="StdManhours" type="ser:duration" />
      <xs:element minOccurs="0" name="StdOffDutyTime" nillable="true" type="tns:SimpleTime" />
      <xs:element minOccurs="0" name="StdOnDutyTime" nillable="true" type="tns:SimpleTime" />
      <xs:element minOccurs="0" name="StdOnDutyTimeDelay" type="ser:duration" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="AttendanceConfig" nillable="true" type="tns:AttendanceConfig" />
  <xs:complexType name="SimpleTime">
    <xs:sequence>
      <xs:element minOccurs="0" name="Hour" type="xs:int" />
      <xs:element minOccurs="0" name="Miniute" type="xs:int" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="SimpleTime" nillable="true" type="tns:SimpleTime" />
  <xs:complexType name="ArrayOfAttendanceInfo">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="AttendanceInfo" nillable="true" type="tns:AttendanceInfo" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="ArrayOfAttendanceInfo" nillable="true" type="tns:ArrayOfAttendanceInfo" />
  <xs:complexType name="AttendanceInfo">
    <xs:sequence>
      <xs:element minOccurs="0" name="ActionTime" type="xs:dateTime" />
      <xs:element minOccurs="0" name="AttendanceType" type="tns:AttendanceType" />
      <xs:element minOccurs="0" name="Date" type="xs:dateTime" />
      <xs:element minOccurs="0" name="Explanation" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="Id" type="ser:guid" />
      <xs:element minOccurs="0" name="IsAbnormalAttendance" type="xs:boolean" />
      <xs:element minOccurs="0" name="UserId" type="ser:guid" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="AttendanceInfo" nillable="true" type="tns:AttendanceInfo" />
  <xs:complexType name="DayInfo">
    <xs:sequence>
      <xs:element minOccurs="0" name="Date" type="xs:dateTime" />
      <xs:element minOccurs="0" name="ExtraShiftInfo" nillable="true" type="tns:ExtraShift" />
      <xs:element minOccurs="0" name="HolidayInfo" nillable="true" type="tns:LegalHoliday" />
      <xs:element minOccurs="0" name="IsNeedToWork" type="xs:boolean" />
      <xs:element minOccurs="0" name="IsWeekEnd" type="xs:boolean" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="DayInfo" nillable="true" type="tns:DayInfo" />
  <xs:complexType name="ExtraShift">
    <xs:sequence>
      <xs:element minOccurs="0" name="EndDate" type="xs:dateTime" />
      <xs:element minOccurs="0" name="Id" type="ser:guid" />
      <xs:element minOccurs="0" name="Name" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="NeedToWork" type="xs:boolean" />
      <xs:element minOccurs="0" name="StartDate" type="xs:dateTime" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="ExtraShift" nillable="true" type="tns:ExtraShift" />
  <xs:complexType name="LegalHoliday">
    <xs:sequence>
      <xs:element minOccurs="0" name="EndDate" type="xs:dateTime" />
      <xs:element minOccurs="0" name="Id" type="ser:guid" />
      <xs:element minOccurs="0" name="Name" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="Remark" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="StartDate" type="xs:dateTime" />
      <xs:element minOccurs="0" name="Year" type="xs:int" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="LegalHoliday" nillable="true" type="tns:LegalHoliday" />
  <xs:complexType name="DayLeaveInfo">
    <xs:sequence>
      <xs:element minOccurs="0" name="Date" type="xs:dateTime" />
      <xs:element minOccurs="0" name="IsWholeDay" type="xs:boolean" />
      <xs:element minOccurs="0" name="Leaves" nillable="true" type="tns:ArrayOfDayLeaveInfoItem" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="DayLeaveInfo" nillable="true" type="tns:DayLeaveInfo" />
  <xs:complexType name="ArrayOfDayLeaveInfoItem">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="DayLeaveInfoItem" nillable="true" type="tns:DayLeaveInfoItem" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="ArrayOfDayLeaveInfoItem" nillable="true" type="tns:ArrayOfDayLeaveInfoItem" />
  <xs:complexType name="DayLeaveInfoItem">
    <xs:sequence>
      <xs:element minOccurs="0" name="Day" type="xs:dateTime" />
      <xs:element minOccurs="0" name="EndTime" type="xs:dateTime" />
      <xs:element minOccurs="0" name="IsForWork" type="xs:boolean" />
      <xs:element minOccurs="0" name="LeaveId" type="ser:guid" />
      <xs:element minOccurs="0" name="LeaveName" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="StartTime" type="xs:dateTime" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="DayLeaveInfoItem" nillable="true" type="tns:DayLeaveInfoItem" />
  <xs:complexType name="ArrayOfLeaveInfo">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="LeaveInfo" nillable="true" type="tns:LeaveInfo" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="ArrayOfLeaveInfo" nillable="true" type="tns:ArrayOfLeaveInfo" />
  <xs:complexType name="DayAttendanceEvaluation">
    <xs:sequence>
      <xs:element minOccurs="0" name="Date" type="xs:dateTime" />
      <xs:element minOccurs="0" name="EarlyMiniutes" type="xs:int" />
      <xs:element minOccurs="0" name="Id" type="ser:guid" />
      <xs:element minOccurs="0" name="IsAbsense" type="xs:boolean" />
      <xs:element minOccurs="0" name="IsExtraWork" type="xs:boolean" />
      <xs:element minOccurs="0" name="IsNeedToWork" type="xs:boolean" />
      <xs:element minOccurs="0" name="LateMiniutes" type="xs:int" />
      <xs:element minOccurs="0" name="Manhours" type="xs:int" />
      <xs:element minOccurs="0" name="UserId" type="ser:guid" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="DayAttendanceEvaluation" nillable="true" type="tns:DayAttendanceEvaluation" />
  <xs:complexType name="EvaluationModifyApplicaiton">
    <xs:sequence>
      <xs:element minOccurs="0" name="ApplyOn" type="xs:dateTime" />
      <xs:element minOccurs="0" name="ApplyText" nillable="true" type="xs:string" />
      <xs:element xmlns:q2="http://schemas.datacontract.org/2004/07/EzDesk.Core.Model" minOccurs="0" name="ApplyUser" nillable="true" type="q2:SimpleUser" />
      <xs:element minOccurs="0" name="ApplyUserId" type="ser:guid" />
      <xs:element minOccurs="0" name="Date" type="xs:dateTime" />
      <xs:element minOccurs="0" name="Id" type="ser:guid" />
      <xs:element minOccurs="0" name="State" type="tns:ApplyState" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="EvaluationModifyApplicaiton" nillable="true" type="tns:EvaluationModifyApplicaiton" />
  <xs:simpleType name="ApplyState">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Applying" />
      <xs:enumeration value="Done" />
    </xs:restriction>
  </xs:simpleType>
  <xs:element name="ApplyState" nillable="true" type="tns:ApplyState" />
  <xs:complexType name="ArrayOfEvaluationModifyApplicaiton">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="EvaluationModifyApplicaiton" nillable="true" type="tns:EvaluationModifyApplicaiton" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="ArrayOfEvaluationModifyApplicaiton" nillable="true" type="tns:ArrayOfEvaluationModifyApplicaiton" />
  <xs:complexType name="ArrayOfEvaluationModifyHistory">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="EvaluationModifyHistory" nillable="true" type="tns:EvaluationModifyHistory" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="ArrayOfEvaluationModifyHistory" nillable="true" type="tns:ArrayOfEvaluationModifyHistory" />
  <xs:complexType name="EvaluationModifyHistory">
    <xs:sequence>
      <xs:element minOccurs="0" name="AttendanceEvaluationChangeList" nillable="true" type="tns:ArrayOfEvaluationModifyHistoryChangeItem" />
      <xs:element minOccurs="0" name="Date" type="xs:dateTime" />
      <xs:element minOccurs="0" name="Id" type="ser:guid" />
      <xs:element minOccurs="0" name="ModifyOn" type="xs:dateTime" />
      <xs:element xmlns:q3="http://schemas.datacontract.org/2004/07/EzDesk.Core.Model" minOccurs="0" name="Operator" nillable="true" type="q3:SimpleUser" />
      <xs:element minOccurs="0" name="OperatorId" type="ser:guid" />
      <xs:element minOccurs="0" name="UserId" type="ser:guid" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="EvaluationModifyHistory" nillable="true" type="tns:EvaluationModifyHistory" />
  <xs:complexType name="ArrayOfEvaluationModifyHistoryChangeItem">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="EvaluationModifyHistoryChangeItem" nillable="true" type="tns:EvaluationModifyHistoryChangeItem" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="ArrayOfEvaluationModifyHistoryChangeItem" nillable="true" type="tns:ArrayOfEvaluationModifyHistoryChangeItem" />
  <xs:complexType name="EvaluationModifyHistoryChangeItem">
    <xs:sequence>
      <xs:element minOccurs="0" name="ItemName" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="NewValue" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="OldValue" nillable="true" type="xs:string" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="EvaluationModifyHistoryChangeItem" nillable="true" type="tns:EvaluationModifyHistoryChangeItem" />
</xs:schema>